#!/usr/bin/env python
#
# Copyright J.H
#

from google.appengine.ext import db

class Spending(db.Model):
  """
  Spending entry
  """
  subject=db.StringProperty(required=True) 
  category=db.StringProperty(required=True)
  amount=db.FloatProperty(required=True)
  currency=db.StringProperty(required=True)
  date=db.DateTimeProperty(required=True)
  owner=db.UserProperty(required=True, auto_current_user_add=True)
  lastModifiedDate=db.DateTimeProperty(required=True, auto_now=True)
  createdDate=db.DateTimeProperty(required=True, auto_now_add=True)


class Category(db.Model):
  """
  Spending Categories
  """
  name=db.StringProperty(required=True)

